home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 41 / Amiga Format CD41 (1999-06)(Future Publishing)(GB)[!][issue 1999-07].iso / -seriously_amiga- / programming / other / sounddt41src / developer / soundclassext.h < prev    next >
C/C++ Source or Header  |  1999-04-19  |  2KB  |  51 lines

  1. #ifndef    DATATYPES_SOUNDCLASSEXT_H
  2. #define    DATATYPES_SOUNDCLASSEXT_H
  3. /*
  4. **  $VER: soundclassext.h 41.1 (28.11.98)
  5. **  Includes Release 41.1
  6. **
  7. **  Interface definitions for DataType sound objects -
  8. **  v41 extensions
  9. **
  10. **  (C) Copyright 1998 by Stephan Rupprecht
  11. **    All Rights Reserved
  12. */
  13.  
  14. #ifndef DATATYPES_SOUNDCLASS_H
  15. #include <datatypes/soundclass.h>
  16. #endif
  17.  
  18. /****************************************************************************/
  19.  
  20. /* type of sample, one of the definitions below */
  21. #define SDTA_SampleType    (SDTA_Dummy + 30)
  22. /* describes the stereo field when playing a mono sample on two stereo
  23.    channels. range 0 - 0x10000. 0 mutes the right channel, 0x10000 the
  24.    left one, 0x8000 centers the sample in the stereo field (default).
  25.    This attribute may affect a playing sound. */
  26. #define SDTA_Panning        (SDTA_Dummy + 31)
  27. /* set and get sample frequency. This attribute may affect a playing sound. */
  28. #define SDTA_Frequency    (SDTA_Dummy + 32)
  29.  
  30. /****************************************************************************/
  31.  
  32. /* definitions for SDTA_SampleType (all types are signed) */
  33. enum {
  34.     SDTST_M8S,    // 8bit mono sample (default)
  35.     SDTST_S8S,    // 8bit stereo sample (samplewise left/right)
  36.     SDTST_M16S,    // same as SDTST_M8S but 16bit
  37.     SDTST_S16S,    // same as SDTST_S8S but 16bit
  38. };
  39.  
  40. /****************************************************************************/
  41.  
  42. /* some handy macros */
  43. #define SDTM_ISSTEREO( SampleType )    ( ( SampleType ) & 1 )
  44. #define SDTM_CHANNELS( SampleType )    ( SDTM_ISSTEREO( SampleType ) + 1 )
  45. #define SDTM_BYTESPERSAMPLE( ST )    ( ( ( ST ) >= SDTST_M16S ) ? 2 : 1 )
  46. #define SDTM_BYTESPERPOINT( ST )    ( SDTM_CHANNELS( ST ) * SDTM_BYTESPERSAMPLE( ST ) )
  47.  
  48. /****************************************************************************/
  49.  
  50. #endif
  51.